package sn.gandal.mobile.kalpet;


import sn.gandal.mobile.kalpet.server.account.AccountManagerSoap;
import android.accounts.AccountManager;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;

public class KalpetAccueilActivity extends Activity {
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // Get the message from the intent
        Intent intent = getIntent();
        
        String numCli=intent.getStringExtra(KalpetConstants.NUMERO_CLIENT);
        String codeSecret=intent.getStringExtra(KalpetConstants.CODE_SECRET);
        String message = getSoapAuth(numCli, codeSecret);
        // Create the text view
        TextView textView = new TextView(this);
        textView.setTextSize(40);
        textView.setText(message);

        setContentView(textView);

        
    }
	
	public String getSoapAuth(String numeroClient, String codeSecret){
	AccountManagerSoap ams=new AccountManagerSoap();
	return ams.authUser(numeroClient, codeSecret);
		
	}

}
